/*
//============================================================================
// Name        : fftw_test.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include ".\..\fftw\fftw3.h"

#define N 100

using namespace std;

int main() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;
}
*/

#include ".\..\fftw\fftw3.h"
int main(void)
{
	int N;
	fftw_complex *in, *out;
	fftw_plan my_plan;

	N=4;

	in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*N);

	*in[0] = 5;
	*in[1] = 0;
	*in[2] = 10;
	*in[3] = 0;

	out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex)*N);

	printf("out = %f\t%f\t%f\t%f\t\n", *out[0], *out[1], *out[2], *out[3]);

	my_plan = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
	fftw_execute(my_plan);

	printf("out = %f\t%f\t%f\t%f\t\n", *out[0], *out[1], *out[2], *out[3]);

	fftw_destroy_plan(my_plan);
	fftw_free(in);
	fftw_free(out);
	return 0;
}
